#include <iostream>
#include <string>
using namespace std;

class Building {
    friend void goodgay();
    friend void good_gay(Building * building);
public:
    Building() {
        m_SettingRoom = "客厅";
        m_BedRoom = "卧室";
    }
    string m_SettingRoom;

private:
    string m_BedRoom;
};

void good_gay(Building * building) {
     cout << "goodgay函数中的 m_SettingRoom 变量为：" << building->m_SettingRoom << endl;
    cout << "goodbay 函数的 m_BedRoom 变量为: " << building->m_BedRoom << endl;
}
void goodgay() {
    Building b;
    cout << "goodgay函数中的 m_SettingRoom 变量为：" << b.m_SettingRoom << endl;
    cout << "goodbay 函数的 m_BedRoom 变量为: " << b.m_BedRoom << endl;
}
int main() {
    goodgay();
    Building b;
    good_gay(&b);
    return 0;
}